﻿using System;

namespace BorgExt
{
    public class ParamDefinition : Qualifiable
    {
        internal static readonly object NoDefault = new object();

        public SlotDefinition SlotDefinition { get; internal set; }
        public Type Type { get; internal set; }
        public string TypeName { get; internal set; }
        public Param DefaultParam { get; internal set; }

        public override bool IsQualified
        {
            get { return Qualifier.IsQualified(this); }
        }

        static ParamDefinition()
        { }

        public ParamDefinition(int id, string name)
            : base(id, name)
        { }

        public override bool Qualify()
        {
            return Qualifier.InternalWeakQualify(this);
        }

        internal override AssemblyElement GetAssemblyElement()
        {
            return SlotDefinition.Contract;
        }
    }
}

